import { BANK_CARD_TYPE, BUSINESS_TYPE, NEAY_BY_ORDER_SORT_TYPE, ORDER_STATUS,FLIGHT_TYPE_ID } from "@/pd-libs/enum/pd-enum";

export namespace ENUM2TEXT {
	/**
	 * 根据business_type获取用车类型文案
	 * @param businessType business_type
	 * @returns 用车类型文案
	 */
	export function BUSINESS_TYPE_NAME(businessType: BUSINESS_TYPE) {
		return {
			[BUSINESS_TYPE.baoche]: '包车',
			[BUSINESS_TYPE.pinche]: '拼车',
		}[businessType];
	}

	/**
	 * 银行卡类型枚举名称
	 */
	export function BANK_CARD_TYPE_NAME (type : BANK_CARD_TYPE) {
		return {
			[BANK_CARD_TYPE.deposit]: '储蓄卡',
			[BANK_CARD_TYPE.corporateAccount]: '一般对公户',
		}[type];
	}

	/**
	 * 附近订单排序方式
	 */
	export function NEARBY_ORDER_SORT_TYPE_NAME (type : NEAY_BY_ORDER_SORT_TYPE) {
		return {
			[NEAY_BY_ORDER_SORT_TYPE.smart]: '智能排序',
			[NEAY_BY_ORDER_SORT_TYPE.timeEarly]: '时间最早',
			[NEAY_BY_ORDER_SORT_TYPE.priceHightest]: '价格最高',
		}[type];
	}
	
	/**
	 * 转单订单列表状态text
	 */
	export function SALE_ORDER_STATUS_NAME (type : ORDER_STATUS) {
		return {
			[ORDER_STATUS.platformAccept]: '待司机接单',
			[ORDER_STATUS.driverAccept]: '已接单待出发',
			[ORDER_STATUS.pickingPassenger]: '接客中',
			[ORDER_STATUS.arriveDepart]: '司机到达上车地点',
			[ORDER_STATUS.passengerReady]: '送客中',
			[ORDER_STATUS.complete]: '已完成',
			[ORDER_STATUS.cancel]: '已取消',
		}[type];
	}
	
	/**
	 * 接送机text
	 */
	export function FLIGHT_TYPE_ID_NAME (type : FLIGHT_TYPE_ID){
		return {
			[FLIGHT_TYPE_ID.drop]: '接机',
			[FLIGHT_TYPE_ID.dropOff]: '送机',
			[FLIGHT_TYPE_ID.station]: '接站',
			[FLIGHT_TYPE_ID.stationOff]: '送站',
			[FLIGHT_TYPE_ID.none]: ''
		}[type];
	}
}